/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pcbeonjms;

/**
 *
 * @author bufu,ady
 */
public enum Resursa {

        LEMN, PIATRA, METAL;

        public float conversie(Resursa res) {
           switch (this) {
                case LEMN:
                    switch (res) {
                        case LEMN:
                            return 1;
                        case PIATRA:
                            return (float) 2 / 3;
                        case METAL:
                            return (float) 1 / 3;
                    }
                case PIATRA:
                    switch (res) {
                        case LEMN:
                            return (float) 3 / 2;
                        case PIATRA:
                            return 1;
                        case METAL:
                            return (float) 1 / 2;
                    }
                case METAL:
                    switch (res) {
                        case LEMN:
                            return 3;
                        case PIATRA:
                            return 2;
                        case METAL:
                            return 1;
                    }
                default:
                    return -1;
            }
        }
    }
